package com.cxx.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.cxx.framework.data.AbstractEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
@TableName(value = "user", autoResultMap = true)
public class User extends AbstractEntity {
    @TableField("username")
    private String username;

    @TableField("gender")
    private Integer gender;

    @TableField("id_number")
    private String idNumber;

    @TableField("phone_number")
    private String phoneNumber;

    @TableField("email")
    private String email;

    @TableField("birth_date")
    private Date birthDate;

    @TableField("avatar")
    private String avatar;

    @TableField(value = "area", typeHandler = JacksonTypeHandler.class)
    private List<String> area;

    @TableField("address")
    private String address;

    @TableField("job")
    private String job;

    @TableField(value = "tags", typeHandler = JacksonTypeHandler.class)
    private List<String> tags;

    @TableField("description")
    private String description;
}
